package com.loves.admin.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDateTime;

@TableName(value = "account")
public class Account {

    @TableId(type = IdType.ASSIGN_UUID)
    private String id;

    private String mailName;

    private String password;

    private Boolean enable;

    private LocalDateTime createDate;

    private String createBy;

    private Boolean deleteFlag;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getMailName() {
        return mailName;
    }

    public void setMailName(String mailName) {
        this.mailName = mailName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Boolean getEnable() {
        return enable;
    }

    public void setEnable(Boolean enable) {
        this.enable = enable;
    }

    public LocalDateTime getCreateDate() {
        return createDate;
    }

    public void setCreateDate(LocalDateTime createDate) {
        this.createDate = createDate;
    }

    public String getcreateBy() {
        return createBy;
    }

    public void setcreateBy(String createBy) {
        this.createBy = createBy;
    }

    public Boolean getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(Boolean deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    public static final class Builder {
        private String id;
        private String mailName;
        private String password;
        private Boolean enable;
        private LocalDateTime createDate;
        private String createBy;
        private Boolean deleteFlag;

        public Builder id(String id) {
            this.id = id;
            return this;
        }

        public Builder mailName(String mailName) {
            this.mailName = mailName;
            return this;
        }

        public Builder password(String password) {
            this.password = password;
            return this;
        }

        public Builder enable(Boolean enable) {
            this.enable = enable;
            return this;
        }

        public Builder createDate(LocalDateTime createDate) {
            this.createDate = createDate;
            return this;
        }

        public Builder createBy(String createBy) {
            this.createBy = createBy;
            return this;
        }

        public Builder deleteFlag(Boolean deleteFlag) {
            this.deleteFlag = deleteFlag;
            return this;
        }

        public Account build() {
            Account account = new Account();
            account.setId(id);
            account.setMailName(mailName);
            account.setPassword(password);
            account.setEnable(enable);
            account.setCreateDate(createDate);
            account.setcreateBy(createBy);
            account.setDeleteFlag(deleteFlag);
            return account;
        }
    }
}
